package castle;

import java.util.ArrayList;
import java.util.HashMap;

public class Room {
	private String description;
    
	private HashMap<String, Room> exits = new HashMap<>();
	
	private ArrayList<String> items =  new ArrayList<>();
	
	private ArrayList<String> settings = new ArrayList<>();
	
	private ArrayList<Character> characters = new ArrayList<>();
	
    public Room(String description) 
    {
        this.description = description;
    }

    public ArrayList<Character> getCharacters() {
    	return characters;
    }
    public void addItem(String item) {
    	items.add(item);
    }
    public void addCharacter(Character character) {
    	characters.add(character);
    }
    public void addSettings(String stuff) {
    	settings.add(stuff);
    }
    public ArrayList<String> getItems() {
    	return items;
    }
    public void setExit(String dir, Room room) {
    	exits.put(dir, room);
    }
    
    public ArrayList<String> getSettings() {
    	return settings;
    }

    public Room getExit(String direction) {
    	return exits.get(direction);
    }
    public String getExistDesc() {
    	StringBuffer sb = new StringBuffer();
    	for (String dir : exits.keySet()) {
    		sb.append(dir);
    		sb.append(' ');
    	}
    	return sb.toString();
    }
    @Override
    public String toString()
    {
        return description;
    }
}
